// 创建路由配置文件
import { createRouter, createWebHistory } from 'vue-router'
import Invoice from '../components/invoice.vue'
import EnteredData from '../components/EnteredData.vue'
import InvoicePhotoAnalysis from '../components/InvoicePhotoAnalysis.vue'
import HistoryRecord from '../components/HistoryRecord.vue'
import PhotoPreprocess from '../components/PhotoPreprocess.vue'
import Login from '../components/Login.vue'
import Data2Chart from '../components/Data2Chart.vue'
import DataAnalysis from '../components/DataAnalysis.vue'
import Data2Excel from '../components/Data2Excel.vue'
import CheckInvoice from '../components/checkInvoice.vue'
const routes = [
  {
    path: '/',
    redirect: '/login' // 根路径重定向到登录页
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/invoice',
    name: 'Invoice',
    component: Invoice,
    children:[
      {
        path: '/entered-data',
        name: 'EnteredData',
        component: EnteredData
      },
      {
        path: '/invoice-photo-analysis',
        name: 'InvoicePhotoAnalysis',
        component: InvoicePhotoAnalysis
      },
      {
        path: '/history-record',
        name: 'HistoryRecord',
        component: HistoryRecord
      },
      {
        path: '/photo-preprocess',
        name: 'PhotoPreprocess',
        component: PhotoPreprocess
      },
      {
        path: '/data-chart',
        name: 'Data2Chart',
        component: Data2Chart
      },
      {
        path: '/data-analysis',
        name: 'DataAnalysis',
        component: DataAnalysis
      },
      {
        path: '/data-excel',
        name: 'Data2Excel',
        component: Data2Excel
      },
      {
        path: '/check-invoice',
        name: 'CheckInvoice',
        component: CheckInvoice
      }
    ]
  },
  // {
  //   path: '/electronic-invoice-analysis',
  //   name: 'ElectronicInvoiceAnalysis',
  //   component: ElectronicInvoiceAnalysis
  // },
  // {
  //   path: '/invoice-photo-analysis',
  //   name: 'InvoicePhotoAnalysis',
  //   component: InvoicePhotoAnalysis
  // },
  // {
  //   path: '/history-record',
  //   name: 'HistoryRecord',
  //   component: HistoryRecord
  // }
  // 其他路由配置
]

export default routes 